<script>
$(function($) {
         var chart = Highcharts.chart('{$id}', {
                    credits: {
                             enabled: false // 禁用版权信息
                   },
                  chart: {
                             plotBackgroundColor: null,
                             plotBorderWidth: null,
                             plotShadow: false
                  },
                  title: {
                             text: ''
                  },
                  tooltip: {
                             headerFormat: '{series.name}<br>',
                             pointFormat: '{point.name}({point.y}): <b>{point.percentage:.1f}%</b>'
                  },
	plotOptions: {
                             pie: {
                             }
	},
                   legend: {
                             layout: 'vertical',
                             align: 'left',
                             x: -10,
                             verticalAlign: 'top',
                             y: -10,
                             floating: true,
                             labelFormatter: function () {
                                       return this.name + " ("+this.y+"):  "+this.percentage.toFixed(2)+"%";
                             }
                   },
                   plotOptions: {
                             pie: {
                                       allowPointSelect: true,
                                       cursor: 'pointer',
                                       dataLabels: {
                                       enabled: false,
                                                format: '{name} ({y})'
                                       },
                             showInLegend: true
                            }
                   },
	series: [{
                             type: 'pie',
                             name: '类型',
                             data: {$data|to_pie|json_encode|raw}
	}]
        });
})
</script>